1. Field of the Invention
This invention relates to a database search system and method.
2. Description of the Related Art
Image data representing a number of images is stored in an image database. By providing search conditions, image data representing an image that conforms to the search conditions is retrieved from the database and output. Attribute information regarding an image (incidental information such as date of photography of the image, place of photography and name of the photographer) also is associated with the image data. Depending upon the database, not only the image data but also the attribute information concerning this image data can be obtained.
In an image database from which attribute information is obtained in addition to image data, the image data and attribute information are stored in one-to-one correspondence in the same table within the same database. As a consequence, there are instances where a search is possible with regard to a certain prescribed search condition but is impossible in the case of another search condition. In such instances the database must be reconstructed from the beginning in order to make it possible to search the database under other search conditions as well.
An object of the present invention is to make possible various database searches in a system of a single type.
According to a first aspect of the present invention, the foregoing object is attained by providing a database search system comprising: an image database in which image data representing images is stored; an attribute information database in which there is stored an attribute information table for storing attribute information regarding image data, which has been stored in the image database, in association with search items; a link information database in which there is stored link information for linking attribute information that has been stored in the attribute information table and image data that has been stored in the image database; an attribute information search unit (attribute information search means) which, on the basis of a given search condition and link information that has been stored in the link information database, is for retrieving and outputting attribute information conforming to the search condition from the attribute information table that has been stored in the attribute information database; and an image data search unit (image data search means) which, on the basis of a given search condition and link information that has been stored in the link information database, is for retrieving and outputting image data that has been stored in the image database.
The first aspect of the present invention provides also a method suited for use in the system described above. Specifically, the method comprises the steps of: storing image data representing images in an image database; storing, in an attribute information database, an attribute information table for storing attribute information regarding image data, which has been stored in the image database, in association with search items; storing, in a link information database, link information for linking attribute information that has been stored in the attribute information table and image data that has been stored in the image database; on the basis of a given search condition and link information that has been stored in the link information database, retrieving and outputting attribute information conforming to the search condition from the attribute information table that has been stored in the attribute information database; and on the basis of a given search condition and link information that has been stored in the link information database, retrieving and outputting image data that has been stored in the image database.
Thus, in accordance with the first aspect of the present invention, the image data is stored in the image database, the attribute information table is stored in the attribute information database and the link information is stored in the link information database.
When a search condition is given, a search is conducted based upon the given search condition and the link information that has been stored in the link information database. Attribute information conforming to the given search condition is retrieved and output from the attribute information table that has been stored in the attribute information table. Further, a search is conducted based upon a search condition and the link information table, and image data that has been stored in the image database is retrieved and output.
The image database in which the image data is stored and the attribute information database in which the attribute information table is stored are separate databases (though they need not necessarily be physically separate and can be separate in logical terms). As a result, it is possible to revise the content of the attribute information table, add to the attribute information table and delete from the attribute information table independently of the image data. A database search that accommodates not only a certain specific search condition but also a variety of search conditions can be conducted.
A plurality of attribute information tables can be stored in the attribute information database. In such case an attribute information table that is to be searched would be searched for among the plurality of attribute information tables, which have been stored in the attribute information database, based upon a given condition and link information that has been stored in the link information database, and attribute information conforming to this search condition would be retrieved and output from the attribute information table that has been found.
Thus, an attribute information table to be searched is found among the plurality of attribute information tables in accordance with a given search condition and a search is conducted using the attribute information table found. This makes possible a database search for accommodating not only a certain specific search condition but also a variety of search conditions.
When an attribute information table conforming to a given search condition and that is to be searched has not been stored in the attribute information database, it will suffice to generate an attribute information table that can be searched in accordance with the given search condition and store this table in the attribute information database. This makes it possible to support searches in accordance with a variety of search conditions without reconstructing the attribute information table from scratch.
Link information that has been stored in the link information database includes first information for linking a given search condition and an attribute information table, and second information for linking a given search condition and image data, by way of example.
Identification codes for identifying the image data may be attached. In such case link data having a plurality of digits for linking the identification codes and the attribute information would be stored in the link information table. The link data and the identification codes would be associated with each other by the data of each digit of the link data.
An arrangement may be adopted in which the attribute information table is generated, it is determined whether the generated attribute information table has been stored in the attribute information database, and in response to a determination that the generated attribute information table has not been stored in the attribute information database, the generated attribute information table is stored in the attribute information database.
A new attribute information table can be stored in the attribute information database. Moreover, since it is determined whether the above-mentioned attribute information table has already been stored in the attribute information database, it will not duplicate an attribute information table that has already been stored in the attribute information database.
An arrangement may be adopted in which the link information that corresponds to the stored attribute information table is generated, responsive to storage of the generated attribute information table in the attribute information database, and the generated link information is stored in the link information database.
Thus, it becomes possible to link the attribute information contained in the attribute information table newly stored in the attribute information database and the image data that has been stored in the image database.
According to a second aspect of the present invention, the foregoing object is attained by providing a database search system comprising: an attribute information database in which there have been stored a plurality of attribute information tables for storing attribute information in association with search items; a link information database in which there is stored link information for specifying an attribute information table to be used in accordance with a given search condition from among the plurality of attribute information tables that have been stored in the attribute information database; and an attribute information search unit (attribute information search means) which, on the basis of a given search condition and link information that has been stored in the link information database, is for searching for an attribute information table to be searched among the plurality of attribute information tables that have been stored in the attribute information database, and retrieving and outputting attribute information conforming to the search condition from the attribute information table that has been found.
The second aspect of the present invention provides also a method suited for use in the system described above. Specifically, the method comprises the steps of: storing, in an attribute information database, a plurality of attribute information tables for storing attribute information in association with search items; storing, in a link information database, a plurality of items of link information for specifying an attribute information table to be used in accordance with a given search condition from among the plurality of attribute information tables that have been stored in the attribute information database; and, on the basis of a given search condition and link information that has been stored in the link information database, searching for an attribute information table to be searched among the plurality of attribute information tables that have been stored in the attribute information database, and retrieving and outputting attribute information conforming to the search condition from the attribute information table that has been found.
Thus, in accordance with the second aspect of the present invention, an attribute information table to be searched is found from among a plurality of attribute information tables in accordance with a given search condition, and a search is conducted using the attribute information table that has been found. A database search that accommodates not only a certain specific search condition but also a variety of search conditions can be conducted.